home *** CD-ROM | disk | FTP | other *** search
- property firstButChan, constrainChan, QTchannel, fps, videoName, paletteName, slider, litButton, ticksPerFrame, frames, globalButtonsEnabled, returnScript, coverSprite
- global gActorList, gHiddenActorList, gRollAnimButton, gVTLobject, g3DObject, gVTLgameObject
-
- on birth me
- set constrainChan to 1
- set firstButChan to 4
- set QTchannel to 10
- set fps to 15
- set globalButtonsEnabled to 0
- set ticksPerFrame to 60 / fps
- set returnScript to "goMenu( gQTViewerObject )"
- return me
- end
-
- on setup me
- set the directToStage of cast videoName to 1
- set the sound of cast videoName to 1
- set the castNum of sprite QTchannel to the number of cast videoName
- set the pausedAtStart of cast videoName to 0
- set the movieRate of sprite QTchannel to 1
- puppetSprite(QTchannel, 1)
- clearAllActors()
- set litButton to EMPTY
- set frames to (the duration of cast videoName / ticksPerFrame) - 1
- set slider to birth(script "Slider Class", constrainChan, firstButChan, frames)
- add(gHiddenActorList, birth(script "Rollover Anim Button Class", "returnFrom( gQTViewerObject, me )", 13, 13, 5, "A14VO01", "A14RO01"))
- add(gHiddenActorList, birth(script "Rollover Anim Button Class", "help( gQTViewerObject, me )", 14, 14, 11, EMPTY, "RCA-05RO02"))
- add(gActorList, me)
- end
-
- on update me
- if the movieRate of sprite QTchannel = 0 then
- if not globalButtonsEnabled then
- set globalButtonsEnabled to 1
- showAllActors()
- end if
- else
- set the currentChoice of slider to ((the movieTime of sprite QTchannel - 1) / 4) + 1
- snapInMiddle(slider)
- end if
- if litButton <> EMPTY then
- if the timer > 30 then
- set the castNum of sprite litButton to the castNum of sprite litButton - 1
- set litButton to EMPTY
- end if
- end if
- end
-
- on sliderHandler me
- pauseQT(me)
- set the castNum of sprite the clickOn to the castNum of sprite the clickOn + 1
- repeat while the stillDown
- updateSlider(slider)
- set the movieTime of sprite QTchannel to (the currentChoice of slider * ticksPerFrame) + 1
- updateStage()
- end repeat
- set the castNum of sprite the clickOn to the castNum of sprite the clickOn - 1
- snap(slider)
- showAllActors()
- set globalButtonsEnabled to 1
- end
-
- on clickPauseButton me
- if the movieRate of sprite QTchannel <> 0 then
- puppetSound("qtClick")
- set the castNum of sprite the clickOn to the castNum of sprite the clickOn + 1
- pauseQT(me)
- updateStage()
- repeat while soundBusy(1)
- end repeat
- puppetSound(0)
- set the castNum of sprite the clickOn to the castNum of sprite the clickOn - 1
- end if
- end
-
- on pauseQT me
- set the sound of cast videoName to 0
- set the movieRate of sprite QTchannel to 0
- end
-
- on playForwards me
- if the movieRate of sprite QTchannel <> 1 then
- puppetSound("qtClick")
- set litButton to the clickOn
- set the castNum of sprite the clickOn to the castNum of sprite the clickOn + 1
- updateStage()
- repeat while soundBusy(1)
- end repeat
- puppetSound(0)
- set the movieRate of sprite QTchannel to 1
- set the sound of cast videoName to 1
- if globalButtonsEnabled then
- set globalButtonsEnabled to 0
- hideOtherActors(me)
- end if
- end if
- end
-
- on playBackwards me
- if the movieRate of sprite QTchannel <> -1 then
- puppetSound("qtClick")
- set litButton to the clickOn
- set the castNum of sprite the clickOn to the castNum of sprite the clickOn + 1
- updateStage()
- repeat while soundBusy(1)
- end repeat
- puppetSound(0)
- set the movieRate of sprite QTchannel to -1
- set the sound of cast videoName to 0
- if globalButtonsEnabled then
- set globalButtonsEnabled to 0
- hideOtherActors(me)
- end if
- end if
- end
-
- on globalButtonClick me
- if the movieRate of sprite QTchannel <> 0 then
- pauseQT(me)
- showAllActors()
- set globalButtonsEnabled to 1
- else
- if objectp(gRollAnimButton) then
- click(gRollAnimButton)
- end if
- end if
- end
-
- on prepareToLeave me
- clearAllActors()
- set globalButtonsEnabled to 0
- set the sound of cast videoName to 0
- set the movieRate of sprite QTchannel to 1
- set the pausedAtStart of cast videoName to 1
- unpuppetAll()
- dispose(slider)
- if not voidp(paletteName) then
- puppetPalette(paletteName)
- else
- puppetPalette(the framePalette)
- end if
- end
-
- on returnFrom me, buttonObject
- makeButtonJump(buttonObject)
- set the locH of sprite QTchannel to -1000
- updateStage()
- do(returnScript)
- end
-
- on help me, buttonObject
- birth(script "Help Parent", buttonObject, #QTviewer)
- end
-